const { Article} = require('../../model/article')

module.exports = async (req,res) => {
    let id =  req.query.id
    let result = await Article.findOneAndDelete({_id:id})
    res.redirect('/admin/article')
}